#ifndef ROLLCADRESEARCHRESULTDIALOG_H
#define ROLLCADRESEARCHRESULTDIALOG_H

#include <QDialog>
#include "rollcadresortfilterproxymodel.h"
#include <QSqlQueryModel>
#include <QTableView>
#include "resulttablemodel.h"
#include <QMainWindow>
#include <QHash>
#include <QStringList>
#include "rollcadresearchdialog.h"

namespace Ui {
class RollCadreSearchResultDialog;
}

class RollCadreSearchResultDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RollCadreSearchResultDialog(QWidget *parent = 0);
    ~RollCadreSearchResultDialog();
    RollCadreSortFilterProxyModel *proxyModel;
    void initResultTable(QString cadrename="",bool samename=false);

private:
    Ui::RollCadreSearchResultDialog *ui;
    ResultTableModel *tableModel;
    void setFilter();
    QHash<QString,QStringList> filterHash;
    QString flag;
    QHash<QString,int> fieldcolumn;
    QHash<int,QString> uniqueCadre();

signals:
    void sendIdData(QStringList);

private slots:

    void receiveData(QHash<QString,QStringList> fhash);   //接收传递过来的数据的槽
    void on_okPushButton_clicked();
    void on_allpushButton_clicked();
    void on_searchpushButton_clicked();
};

#endif // ROLLCADRESEARCHRESULTDIALOG_H
